home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17900 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news.MediaCity.com!usenet
  2. From: Hal Hildebrand <halh@polymorphicSoftware.com>
  3. Newsgroups: comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++?
  5. Date: Wed, 17 Apr 1996 18:22:25 -0700
  6. Organization: Polymorphic Software, Inc.
  7. Message-ID: <31759951.6E0@polymorphicSoftware.com>
  8. References: <3134D499.653E@ix.netcom.com> <4kbfn8$1bu@news1.is.net> <4kqjf6$kh0@kaiwan009.kaiwan.com> <317173F1.5790@concentric.net> <Dpz6It.2An@undergrad.math.uwaterloo.ca>
  9. NNTP-Posting-Host: easy3.mediacity.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01 (WinNT; I)
  14.  
  15. Carl Laurence Gonsalves wrote:
  16. > Both factorial and fibonacci are tail-recursive, which means that your
  17. > translator may be doing tail recursion elimination, folding your n message
  18. > sends (or function calls) down to one (plus a loop).
  19. > I don't know of any C compilers that do tail recursion elimination. I
  20. > don't know enough about the workings of Smalltalk to say for sure, but it
  21. > may be possible that your translator is doing tail recursion elimination,
  22. > thereby making message sends seem to be a heck of a lot more efficient
  23. > than they really are.
  24. > Try doing a similar test with functions that aren't tail-recursive. Or at
  25. > least find out if your Smalltalk translator may be doing tail-recursion
  26. > elimination.
  27.  
  28. Nice try.  Smalltalk can't eliminate tail recursion for all the
  29. reasons that it is claimed to be slow.  No type information...
  30.     -Hal
  31. -- 
  32. When the going gets strange,
  33.         the strange ask for royalties
  34.  
  35. Polymorphic Software, Inc.
  36. halh@polymorphicSoftware.com
  37. http://www.polymorphicSoftware.com
  38.